package com.osce.interfaces.ex;

import com.baomidou.mybatisplus.extension.service.IService;
import com.csce.domain.entity.exam.ExExercise;

import java.util.List;
import java.util.Map;

/**
 * 理论练习Service接口
 *
 * @author zzx
 * @since 2023-08-02
 */
public interface IExExerciseService extends IService<ExExercise> {

    /**
     * 查询理论练习
     *
     * @param id 理论练习主键
     * @return 理论练习
     */
    ExExercise selectExExerciseById(Long id);

    /**
     * 查询理论练习列表
     *
     * @param exExercise 理论练习
     * @return 理论练习集合
     */
    List<ExExercise> selectExExerciseList(ExExercise exExercise);

    /**
     * 新增理论练习
     *
     * @param exExercise 理论练习
     * @return 结果
     */
    int insertExExercise(ExExercise exExercise, Long... questionIds);

    int createExExercise(ExExercise exExercise);

    /**
     * 修改理论练习
     *
     * @param exExercise 理论练习
     * @return 结果
     */
    int updateExExercise(ExExercise exExercise);

    /**
     * 批量删除理论练习
     *
     * @param ids 需要删除的理论练习主键集合
     * @return 结果
     */
    int deleteExExerciseByIds(Long[] ids);

    /**
     * 删除理论练习信息
     *
     * @param id 理论练习主键
     * @return 结果
     */
    int deleteExExerciseById(Long id);

    int submit(Long id, Integer timer, Map<Long, Object> answers);
}
